﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Reflection;

namespace Cherry.Agile.RpcService
{

    /// <summary>
    /// 服务配置
    /// </summary>
    public class ServiceConfigInfo
    {
        /// <summary>
        /// 是否开启运行时跟踪器
        /// </summary>
        public bool TraceEnabled { get; set; }

        /// <summary>
        /// 配置加载的时间
        /// </summary>
        public DateTime LoadTime { get; set; }

        /// <summary>
        /// 支持的语言列表(LCID)
        /// </summary>
        public List<Int16> SupportedLanguage { get; set; }

        public ServiceConfigInfo()
        {
            AssemblyList = new Dictionary<string, AssemblyInfo>();
            ProcessModuleList = new Dictionary<int, ProcessModuleInfo>();
            ExtentProcessor = new ServiceExtentProcessor();
            AppServerAddress = new Dictionary<int, string>();
            UpgradeFtpInfo = new UpgradeFtpInfo();
        }
        /// <summary>
        /// 程序集列表
        /// </summary>
        public Dictionary<string, AssemblyInfo> AssemblyList { get; set; }
        /// <summary>
        /// 业务处理插件列表
        /// </summary>
        public Dictionary<int, ProcessModuleInfo> ProcessModuleList { get; set; }

        /// <summary>
        /// 不同版本的协议包处理器
        /// </summary>
        public Dictionary<Version, IServiceProcessor> ServiceProcessor { get; set; }
        /// <summary>
        /// 扩展处理器
        /// </summary>
        public ServiceExtentProcessor ExtentProcessor { get; set; }
        /// <summary>
        /// 验证接口插件模块
        /// </summary>
        public IServiceProcessor AuthenModule { get; set; }

        /// <summary>
        /// 检查是否有新通知接口模块
        /// </summary>
        public IServiceProcessor CheckNewNotifyModule { get; set; }

        /// <summary>
        /// 加载过程跟踪信息
        /// </summary>
        public string LoadTraceMessage { get; set; }

        public string ConfigManageKey { get; set; }

        /// <summary>
        /// 服务器地址
        /// </summary>
        public Dictionary<int, string> AppServerAddress { get; set; }

        /// <summary>
        /// 软件升级FTP地址
        /// </summary>
        public UpgradeFtpInfo UpgradeFtpInfo { get; set; }

    }
}
